home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / System7 tools / R / RequiredAE XCMD ƒ / source / sendAEOpen.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-11  |  1.2 KB  |  70 lines  |  [TEXT/KAHL]

  1. /***
  2.  * sendAEOpen.c
  3.  *
  4.  *  This hypercard XFCN will send a AE open command to some target
  5.  *  application.  The error returned will be returned to the caller.
  6.  *
  7.  *  Gordon Watts July '91 Copyright.
  8.  *
  9.  ***/
  10. #include    <HyperXCmd.h>
  11. #include "hyperUtil.h"
  12. #include "Util.h"
  13.  
  14. /**
  15.  ** some config defines...
  16.  **/
  17.  
  18. #define usageString "sendAEOpen"
  19. #define versionString "sendAEOpen v1.0 Gordon Watts"
  20. #define badString "This should never be returned!  BuG! Bug!"
  21.  
  22. /**
  23.  * main 
  24.  *
  25.  *  Main routine for this xfunction.
  26.  *
  27.  **/
  28. pascal void main(XCmdPtr paramPtr)
  29. {
  30.     Boolean done = false;
  31.     
  32.     /**
  33.      ** Set up default return values
  34.      **/
  35.  
  36.     paramPtr -> returnValue = strToHandle(paramPtr, badString);
  37.     paramPtr -> passFlag = false;
  38.     
  39.     /**
  40.      ** First, do the usage messages: a "!" and a "?".
  41.      **/
  42.     
  43.     if (paramPtr -> paramCount == 1) {
  44.     
  45.         switch (**(paramPtr -> params[0])) {
  46.         
  47.             case '!':
  48.                 paramPtr -> returnValue = strToHandle (paramPtr, 
  49.                                         versionString);
  50.                 done = true;
  51.                 break;
  52.             
  53.             case '?':
  54.                 paramPtr -> returnValue = strToHandle (paramPtr,
  55.                                         usageString);
  56.                 done = true;
  57.                 break;
  58.             
  59.         }
  60.     }
  61.  
  62.     /**
  63.      ** Ok.  Next job, we had better make sure that we have the
  64.      ** correct number of parameters
  65.      **/
  66.     
  67.     
  68.     return;
  69. }
  70.